package com.info.zhiduoduo.weixin.controller;

import com.info.zhiduoduo.common.constants.SmartResult;
import com.info.zhiduoduo.common.formbean.BaseSimpleFormBean;
import com.info.zhiduoduo.weixin.formbean.notice.NoticeListFormBean;
import com.info.zhiduoduo.weixin.service.NoticeService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/notice")
public class NoticeController {

	@Autowired
	NoticeService noticeService;

	@PostMapping("/list")
	public SmartResult getNoticeList(@RequestBody BaseSimpleFormBean<NoticeListFormBean> formBean) {
		return noticeService.getNoticeList(formBean);
	}

	@PostMapping("/detail")
	public SmartResult getDetail(@RequestBody BaseSimpleFormBean<Integer> formBean) {
		return noticeService.getDetail(formBean);
	}
}
